<div class="menu">
	<div align="right" style="font-weight:bold; font-size:12px; padding-bottom:8px; color:#0858A2;">
		<?php echo $this->Access->getMyRole($this->Access->getMy('group_id')).": ".$this->Access->getMy('nombre_completo');?>
	</div>
		<?php  $this->Form->cuenta($this->Access->getMy('id'));?>	
	<div class="desplegable">
		<?php  $this->Form->menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));?>
	</div>
</div>
<div class="users form">
<?php echo $this->Form->create('User');?>
	<fieldset>
		<legend><?php __('Editar Usuario'); ?></legend>
		<table class="tabla_formulario">
				<?php echo $this->Form->input('id');?>
			<tr>
				<td><?php echo $this->Form->input('nombre');?></td>
				<td><?php echo $this->Form->input('apellido');?></td>
			</tr>
			<tr>
				<td><?php echo $this->Form->input('username', array('type'=>'text'));?></td>
				<?php $group_id= $this->Access->getMy('group_id');
		              $user_id= $this->Access->getMy('id');
	                	if($group_id=="1"){?>	
				      <td><?php echo $this->Form->input('password');?></td>
				<?php }else {?>
				      <td><?php echo $this->Form->input('password',array('disabled'=>true));?></td>
				<?php }?>
			</tr>
			<tr>
				<td><?php echo $this->Form->input('correo', array('type'=>'text'));?></td>
				<?php $group_id= $this->Access->getMy('group_id');
		              $user_id= $this->Access->getMy('id');
	                	if($group_id=="1"){?>			
				           <td><?php echo $this->Form->input('group_id',array('label'=>'Grupo'));?></td>
			      <?php }else {?>			   
			    <td><?php echo $this->Form->input('group_id',array('label'=>'Grupo','options'=>$groups, 'disabled'=>true, 'id'=>'group'));?></td>
			   <?php }?>
			<tr>
			   <?php $group_id= $this->Access->getMy('group_id');
		              $user_id= $this->Access->getMy('id');
	                	if($group_id=="1"){?>		
				         <td colspan="2"><?php echo $this->Form->input('EntidadesTerritoriale');?></td>
			   <?php }else {?>   
			     <td colspan="2"><?php echo $this->Form->input('EntidadesTerritoriale',array('label'=>'EntidadesTerritoriale','options'=>$entidadesTerritoriales, 'disabled'=>true, 'id'=>'entidadesTerritoriale'));?></td>
			   <?php }?>
			</tr>
		</table>
	</fieldset>
<?php echo $this->Form->end(__('Actualizar', true));?>
</div>
